package PlaneTest;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;


//游戏主窗口
public class MyGameFrame extends Frame {
    //初始化窗口
    public void launchFrame(){
        this.setTitle("是男人你就坚持20秒");
        setVisible(true);//窗口默认可见
        setSize(1026,645);//设置窗口大小
        setLocation(400,400);//窗口打开的位置
        //增加关闭窗口操作
        this.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);//正常退出
            }
        });
    }



    public static void main(String[] args) {
        MyGameFrame gameFrame = new MyGameFrame();
        gameFrame.launchFrame();
    }
}
